package com.qifenqian.turbot.module.ui.order.orders

import android.content.Context
import android.content.Intent
import com.blankj.rxbus.RxBus
import com.qifenqian.turbot.R
import com.qifenqian.turbot.base.BaseActivity
import com.qifenqian.turbot.module.contract.OrderContract
import com.qifenqian.turbot.module.presenter.OrderPresenter
import kotlinx.android.synthetic.main.activity_order_refund_result.*

/**
 * @author H
 * @createDate 2019/1/11 11:09
 * @description 退款成功界面
 * @see
 * @since
 */
const val RX_REFUND_OK = "refund_ok"

class OrderRefundResultActivity : BaseActivity<OrderPresenter, OrderContract.View>(), OrderContract.View {

    companion object {
        fun startThis(context: Context) {
            val intent = Intent(context, OrderRefundResultActivity::class.java)
            context.startActivity(intent)
        }
    }

    override fun bindLayoutId(): Int {
        return R.layout.activity_order_refund_result
    }

    override fun bindPresenter(): OrderPresenter? {
        return OrderPresenter(this, this)
    }

    override fun initial() {
        tv_order_refund_result_money.text = "退款金额"
        tv_order_refund_result_time.text = "退款时间"
        btn_order_refund_result_next.setOnClickListener {
            RxBus.getDefault().post("退款成功", RX_REFUND_OK)
            finish()
        }
    }

}
